/**
 * Copyright (C) 2019 Baidu, Inc. All Rights Reserved.
 */
package com.bailiban.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bailiban.dao.AccountMapper;
import com.bailiban.domain.Account;
import com.bailiban.service.AccountService;

/**
 * 类说明:账户业务实现类
 * 
 * @author zl
 * @version 创建时间：2019年12月10日 上午10:22:09
 * @Company http://www.bailiban.com
 */
@Service
@Transactional
public class AccountServiceImpl implements AccountService {
    @Autowired
    private AccountMapper aMapper;

    // 查询账户
    @Override
    public List<Account> findAll() {
        System.out.println("查询成功");
        List<Account> list = aMapper.findAll();
        return list;
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.bailiban.service.AccountService#save(com.bailiban.domain.Account)
     */
    @Override
    public void save(Account account) {

        aMapper.save(account);
        // 测试事务
        int i = 1 / 0;

    }

}
